.mod-group.create-group(ng-form name="groupFrom" ng-class="{'need-valid':needValid}" novalidate)
	loading(ng-if="isWaitingCreate")
	ul.info-list.group-info
		li
			span.info-name 组名称
			.info-content
				.line-long
					input.ui-input-fill.line-element(ng-model="group.name" name="groupName" required ng-pattern="/^[a-z0-9]+([._-][a-z0-9]+)*$/" is-group-exist ng-model-options="{updateOn:'default blur',debounce:{default:500,blur:0}}" )
				span.txt-error(ng-if="(needValid||groupFrom.groupName.$dirty)&&groupFrom.groupName.$error.required") 必填
				span.txt-error(ng-if="(needValid||groupFrom.groupName.$dirty)&&!groupFrom.groupName.$error.required&&groupFrom.groupName.$error.pattern") 非法的名称
				span.txt-error(ng-if="(needValid||groupFrom.groupName.$dirty)&&!groupFrom.groupName.$error.required&&!groupFrom.groupName.$error.pattern&&groupFrom.groupName.$invalid") 组名已存在
		li
			span.info-name 组描述
			.info-content
				.line-long
					textarea.ui-input-fill.line-element(ng-model="group.description")
		li
			span.info-name 组成员
			.info-content
				.line-long
					.com-select-con.line-element(select-con label="true")
						ul.selected-labels
							li.select-label(ng-repeat="user in selectedUsers" ng-cloak)
								| {{user.username}}
								a.icon-cancel(ng-click="cancelUser($index)")
							li.select-input
								input.line-element.ui-btn-select(placeholder="搜索成员" ng-model="userKey.key" ng-keydown="userKeyDown($event,userKey.key,userListFiltered[0])")
						ul.select-list
							li(ng-if="!userList||userListFiltered.length===0")
								a 无相关用户信息
							li.select-item(ng-repeat="user in userListFiltered=(userList| filter:{'username':userKey.key})")
								a(ng-bind="user.username" ng-click="selectUser(user.id,user.username);")
				.line-long
					.com-select-con.line-element(select-con)
						button.ui-btn.ui-btn-select.ui-btn-white(ng-cloak)
							i.icon-down
							| {{role}}
						ul.select-list
							li.select-item
								a(ng-click="toggleRole('MASTER')") MASTER
							li.select-item
								a(ng-click="toggleRole('DEVELOPER')") DEVELOPER
							li.select-item
								a(ng-click="toggleRole('REPORTER')") REPORTER
					button.ui-btn.ui-btn-sm.ui-btn-primary.ui-btn-add(ng-click="addUser()") 添加
				.line-long.line-member
					table.ui-table-primary
						thead
							tr
								th 成员名
								th 组权限
								th
						tbody
							tr
								td(ng-bind="myself.username")
								td(ng-bind="myself.role")
								td
							tr(ng-repeat="user in selectedUsersList")
								td(ng-bind="user.username")
								td
									.com-select-con(select-con)
										button.ui-btn.ui-btn-white.ui-btn-select(ng-cloak)
											i.icon-down
											| {{user.role}}
										ul.select-list
											li.select-item
												a(ng-click="user.role='MASTER'") MASTER
											li.select-item
												a(ng-click="user.role='DEVELOPER'") DEVELOPER
											li.select-item
												a(ng-click="user.role='REPORTER'") REPORTER											
								td
									a.icon-delete(ng-click="deleteUser($index)")
	.com-bottom-option
		span.com-bottom-option-con
			button.ui-btn.ui-btn-md.ui-btn-bright(ng-disabled="isWaitingCreate" ng-click="needValid=true;groupFrom.$valid&&createGroup()") 完成创建
			span.txt-error(ng-if="needValid&&groupFrom.$invalid") 您有不合法数据，请修改后重试。